package comday03.itheima01;

public class Demo06求和 {

    public static void main(String[] args) {
        //求1-5的和

        int sum = 0;
        int i = 1;

        while(i<=5){
            sum += i;
            i++;
        }

        System.out.println("和是" + sum);
    }
}
